home *** CD-ROM | disk | FTP | other *** search
/ Aminet 35 / Aminet 35 (2000)(Schatztruhe)[!][Feb 2000].iso / Aminet / comm / tcp / samba_2.0.6.lha / docs / textdocs / DIAGNOSIS.txt < prev    next >
Encoding:
Text File  |  1999-11-11  |  11.8 KB  |  311 lines

  1. !==
  2. !== DIAGNOSIS.txt for Samba release 2.0.6 11 Nov 1999
  3. !==
  4. Contributor:    Andrew Tridgell
  5. Updated:    October 14, 1997
  6.  
  7. Subject:    DIAGNOSING YOUR SAMBA SERVER
  8. ===========================================================================
  9.  
  10. This file contains a list of tests you can perform to validate your
  11. Samba server. It also tells you what the likely cause of the problem
  12. is if it fails any one of these steps. If it passes all these tests
  13. then it is probably working fine.
  14.  
  15. You should do ALL the tests, in the order shown. I have tried to
  16. carefully choose them so later tests only use capabilities verified in
  17. the earlier tests.
  18.  
  19. I would welcome additions to this set of tests. Please mail them to
  20. samba-bugs@samba.org
  21.  
  22. If you send me an email saying "it doesn't work" and you have not
  23. followed this test procedure then you should not be surprised if I
  24. ignore your email.
  25.  
  26.  
  27. ASSUMPTIONS
  28. -----------
  29.  
  30. In all of the tests I assume you have a Samba server called BIGSERVER
  31. and a PC called ACLIENT. I also assume the PC is running windows for
  32. workgroups with a recent copy of the microsoft tcp/ip stack. Alternatively,
  33. your PC may be running Windows 95 or Windows NT (Workstation or Server).
  34.  
  35. The procedure is similar for other types of clients.
  36.  
  37. I also assume you know the name of an available share in your
  38. smb.conf. I will assume this share is called "tmp". You can add a
  39. "tmp" share like by adding the following to smb.conf:
  40.  
  41. [tmp]
  42.  comment = temporary files 
  43.  path = /tmp
  44.  read only = yes
  45.  
  46.  
  47. THESE TESTS ASSUME VERSION 1.9.16 OR LATER OF THE SAMBA SUITE. SOME
  48. COMMANDS SHOWN DID NOT EXIST IN EARLIER VERSIONS
  49.  
  50. Please pay attention to the error messages you receive. If any error message
  51. reports that your server is being unfriendly you should first check that you
  52. IP name resolution is correctly set up. eg: Make sure your /etc/resolv.conf
  53. file points to name servers that really do exist.
  54.  
  55. Also, if you do not have DNS server access for name resolution please check
  56. that the settings for your smb.conf file results in "dns proxy = no". The
  57. best way to check this is with "testparm smb.conf"
  58.  
  59.  
  60. TEST 1:
  61. -------
  62.  
  63. In the directory in which you store your smb.conf file, run the command
  64. "testparm smb.conf". If it reports any errors then your smb.conf
  65. configuration file is faulty.
  66.  
  67. Note:    Your smb.conf file may be located in: /etc
  68.     Or in:   /usr/local/samba/lib
  69.  
  70.  
  71. TEST 2:
  72. -------
  73.  
  74. run the command "ping BIGSERVER" from the PC and "ping ACLIENT" from
  75. the unix box. If you don't get a valid response then your TCP/IP
  76. software is not correctly installed. 
  77.  
  78. Note that you will need to start a "dos prompt" window on the PC to
  79. run ping.
  80.  
  81. If you get a message saying "host not found" or similar then your DNS
  82. software or /etc/hosts file is not correctly setup. It is possible to
  83. run samba without DNS entries for the server and client, but I assume
  84. you do have correct entries for the remainder of these tests. 
  85.  
  86. Another reason why ping might fail is if your host is running firewall 
  87. software. You will need to relax the rules to let in the workstation
  88. in question, perhaps by allowing access from another subnet (on Linux
  89. this is done via the ipfwadm program.)
  90.  
  91.  
  92. TEST 3:
  93. -------
  94.  
  95. Run the command "smbclient -L BIGSERVER" on the unix box. You
  96. should get a list of available shares back. 
  97.  
  98. If you get a error message containing the string "Bad password" then
  99. you probably have either an incorrect "hosts allow", "hosts deny" or
  100. "valid users" line in your smb.conf, or your guest account is not
  101. valid. Check what your guest account is using "testparm" and
  102. temporarily remove any "hosts allow", "hosts deny", "valid users" or
  103. "invalid users" lines.
  104.  
  105. If you get a "connection refused" response then the smbd server could
  106. not be running. If you installed it in inetd.conf then you probably edited
  107. that file incorrectly. If you installed it as a daemon then check that
  108. it is running, and check that the netbios-ssn port is in a LISTEN
  109. state using "netstat -a".
  110.  
  111. If you get a "session request failed" then the server refused the
  112. connection. If it says "Your server software is being unfriendly" then
  113. its probably because you have invalid command line parameters to smbd,
  114. or a similar fatal problem with the initial startup of smbd. Also
  115. check your config file (smb.conf) for syntax errors with "testparm"
  116. and that the various directories where samba keeps its log and lock
  117. files exist.
  118.  
  119. There are a number of reasons for which smbd may refuse or decline
  120. a session request. The most common of these involve one or more of
  121. the following smb.conf file entries:
  122.     hosts deny = ALL
  123.     hosts allow = xxx.xxx.xxx.xxx/yy
  124.     bind interfaces only = Yes
  125.  
  126. In the above, no allowance has been made for any session requests that
  127. will automatically translate to the loopback adaptor address 127.0.0.1.
  128. To solve this problem change these lines to:
  129.     hosts deny = ALL
  130.     hosts allow = xxx.xxx.xxx.xxx/yy 127.
  131. Do NOT use the "bind interfaces only" parameter where you may wish to
  132. use the samba password change facility, or where smbclient may need to
  133. access local service for name resolution or for local resource
  134. connections. (Note: the "bind interfaces only" parameter deficiency
  135. where it will not allow connections to the loopback address will be
  136. fixed soon).
  137.  
  138. Another common cause of these two errors is having something already running 
  139. on port 139, such as Samba (ie: smbd is running from inetd already) or
  140. something like Digital's Pathworks. Check your inetd.conf file before trying
  141. to start smbd as a daemon, it can avoid a lot of frustration!
  142.  
  143. And yet another possible cause for failure of TEST 3 is when the subnet mask
  144. and / or broadcast address settings are incorrect. Please check that the
  145. network interface IP Address / Broadcast Address / Subnet Mask settings are
  146. correct and that Samba has correctly noted these in the log.nmb file.
  147.  
  148. TEST 4:
  149. -------
  150.  
  151. Run the command "nmblookup -B BIGSERVER __SAMBA__". You should get the
  152. IP address of your Samba server back.
  153.  
  154. If you don't then nmbd is incorrectly installed. Check your inetd.conf
  155. if you run it from there, or that the daemon is running and listening
  156. to udp port 137.
  157.  
  158. One common problem is that many inetd implementations can't take many
  159. parameters on the command line. If this is the case then create a
  160. one-line script that contains the right parameters and run that from
  161. inetd.
  162.  
  163.  
  164. TEST 5:
  165. -------
  166.  
  167. run the command "nmblookup -B ACLIENT '*'"
  168.  
  169. You should get the PCs IP address back. If you don't then the client
  170. software on the PC isn't installed correctly, or isn't started, or you
  171. got the name of the PC wrong. 
  172.  
  173.  
  174. TEST 6:
  175. -------
  176.  
  177. Run the command "nmblookup -d 2 '*'"
  178.  
  179. This time we are trying the same as the previous test but are trying
  180. it via a broadcast to the default broadcast address. A number of
  181. Netbios/TCPIP hosts on the network should respond, although Samba may
  182. not catch all of the responses in the short time it listens. You
  183. should see "got a positive name query response" messages from several
  184. hosts. 
  185.  
  186. If this doesn't give a similar result to the previous test then
  187. nmblookup isn't correctly getting your broadcast address through its
  188. automatic mechanism. In this case you should experiment use the
  189. "interfaces" option in smb.conf to manually configure your IP
  190. address, broadcast and netmask. 
  191.  
  192. If your PC and server aren't on the same subnet then you will need to
  193. use the -B option to set the broadcast address to the that of the PCs
  194. subnet.
  195.  
  196. This test will probably fail if your subnet mask and broadcast address are
  197. not correct. (Refer to TEST 3 notes above).
  198.  
  199. TEST 7:
  200. -------
  201.  
  202. Run the command "smbclient '\\BIGSERVER\TMP'". You should then be
  203. prompted for a password. You should use the password of the account
  204. you are logged into the unix box with. If you want to test with
  205. another account then add the -U <accountname> option to the end of
  206. the command line.  eg: smbclient //bigserver/tmp -Ujohndoe
  207.  
  208. Note: It is possible to specify the password along with the username
  209. as follows:
  210.     smbclient //bigserver/tmp -Ujohndoe%secret
  211.  
  212. Once you enter the password you should get the "smb>" prompt. If you
  213. don't then look at the error message. If it says "invalid network
  214. name" then the service "tmp" is not correctly setup in your smb.conf.
  215.  
  216. If it says "bad password" then the likely causes are:
  217.  
  218. - you have shadow passords (or some other password system) but didn't
  219. compile in support for them in smbd
  220. - your "valid users" configuration is incorrect
  221. - you have a mixed case password and you haven't enabled the "password
  222. level" option at a high enough level
  223. - the "path =" line in smb.conf is incorrect. Check it with testparm
  224. - you enabled password encryption but didn't create the SMB encrypted
  225. password file
  226.  
  227. Once connected you should be able to use the commands "dir" "get"
  228. "put" etc. Type "help <command>" for instructions. You should
  229. especially check that the amount of free disk space shown is correct
  230. when you type "dir".
  231.  
  232.  
  233. TEST 8:
  234. -------
  235.  
  236. On the PC type the command "net view \\BIGSERVER". You will need to do
  237. this from within a "dos prompt" window. You should get back a list of
  238. available shares on the server.
  239.  
  240. If you get a "network name not found" or similar error then netbios
  241. name resolution is not working. This is usually caused by a problem in
  242. nmbd. To overcome it you could do one of the following (you only need
  243. to choose one of them):
  244.  
  245. - fixup the nmbd installation
  246. - add the IP address of BIGSERVER to the "wins server" box in the
  247. advanced tcp/ip setup on the PC.
  248. - enable windows name resolution via DNS in the advanced section of
  249. the tcp/ip setup
  250. - add BIGSERVER to your lmhosts file on the PC.
  251.  
  252. If you get a "invalid network name" or "bad password error" then the
  253. same fixes apply as they did for the "smbclient -L" test above. In
  254. particular, make sure your "hosts allow" line is correct (see the man
  255. pages)
  256.  
  257. Also, do not overlook that fact that when the workstation requests the
  258. connection to the samba server it will attempt to connect using the 
  259. name with which you logged onto your Windows machine. You need to make
  260. sure that an account exists on your Samba server with that exact same
  261. name and password.
  262.  
  263. If you get "specified computer is not receiving requests" or similar
  264. it probably means that the host is not contactable via tcp services.
  265. Check to see if the host is running tcp wrappers, and if so add an entry in
  266. the hosts.allow file for your client (or subnet, etc.)
  267.  
  268.  
  269. TEST 9:
  270. --------
  271.  
  272. Run the command "net use x: \\BIGSERVER\TMP". You should be prompted
  273. for a password then you should get a "command completed successfully"
  274. message. If not then your PC software is incorrectly installed or your
  275. smb.conf is incorrect. make sure your "hosts allow" and other config
  276. lines in smb.conf are correct.
  277.  
  278. It's also possible that the server can't work out what user name to
  279. connect you as. To see if this is the problem add the line "user =
  280. USERNAME" to the [tmp] section of smb.conf where "USERNAME" is the
  281. username corresponding to the password you typed. If you find this
  282. fixes things you may need the username mapping option.
  283.  
  284.  
  285. TEST 10:
  286. --------
  287.  
  288. From file manager try to browse the server. Your samba server should
  289. appear in the browse list of your local workgroup (or the one you
  290. specified in smb.conf). You should be able to double click on the name
  291. of the server and get a list of shares. If you get a "invalid
  292. password" error when you do then you are probably running WinNT and it
  293. is refusing to browse a server that has no encrypted password
  294. capability and is in user level security mode. In this case either set
  295. "security = server" AND "password server = Windows_NT_Machine" in your
  296. smb.conf file, or enable encrypted passwords AFTER compiling in support
  297. for encrypted passwords (refer to the Makefile).
  298.  
  299.  
  300. Still having troubles?
  301. ----------------------
  302.  
  303. Try the mailing list or newsgroup, or use the tcpdump-smb utility to
  304. sniff the problem. The official samba mailing list can be reached at
  305. samba@samba.org. To find out more about samba and how to
  306. subscribe to the mailing list check out the samba web page at
  307.               http://samba.org/samba
  308.  
  309. Also look at the other docs in the Samba package!
  310.  
  311.